package com.fancy.imasclient.client;

import com.fancy.common.dto.ArtistBasicInfo;
import com.fancy.common.dto.response.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(name = "music-service", path = "/api/v1", contextId = "artistServiceClient")
public interface ArtistServiceClient {

    /**
     * 获取歌手基本信息
     */
    @GetMapping("/internal/artists/{artistId}")
    Result<ArtistBasicInfo> getArtistBasicInfo(@PathVariable("artistId") Long artistId);

    /**
     * 批量获取歌手信息
     */
    @PostMapping("/internal/artists/batch")
    Result<List<ArtistBasicInfo>> getArtistBasicInfoBatch(@RequestBody List<Long> artistIds);
}
